<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:animateLayoutChanges="@bool/animate_layout_change"
    android:background="@color/clr_grey2" >

    <!-- list -->

    <ListView
        android:id="@+id/activity_search_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@+id/player_layout"
        android:clipToPadding="false"
        android:divider="@color/clr_trans_grey"
        android:dividerHeight="1px"
        android:overScrollMode="never"
        android:paddingLeft="@dimen/margin_large"
        android:paddingRight="@dimen/margin_large"
        android:paddingTop="@dimen/margin_large"
        android:scrollbarStyle="outsideOverlay" >
    </ListView>

    <!-- network issues -->

    <include
        android:id="@+id/activity_search_noresult"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        layout="@layout/view_no_result"
        android:visibility="gone" />

    <include
        android:id="@+id/activity_search_loading"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        layout="@layout/view_loading"
        android:visibility="gone" />

    <include
        android:id="@+id/activity_search_reload"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_centerInParent="true"
        layout="@layout/view_reload"
        android:visibility="gone" />

    <LinearLayout
        android:id="@+id/player_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:clickable="true"
        android:orientation="vertical"
        android:visibility="gone" >

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="?android:attr/listPreferredItemHeight"
            android:background="@drawable/selector_player_banner" >

            <!-- image -->

            <ImageView
                android:id="@+id/player_thumb"
                android:layout_width="?android:attr/listPreferredItemHeight"
                android:layout_height="?android:attr/listPreferredItemHeight"
                android:layout_alignParentLeft="true"
                android:layout_centerVertical="true"
                android:padding="@dimen/margin_medium"
                android:scaleType="centerInside" />

            <!-- text -->

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_toLeftOf="@+id/player_like"
                android:layout_toRightOf="@+id/player_thumb"
                android:gravity="center_vertical|left"
                android:orientation="vertical" >

                <TextView
                    android:id="@+id/player_title"
                    style="@android:style/TextAppearance.Medium"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:singleLine="true"
                    android:text="@string/text_default"
                    android:textColor="@android:color/primary_text_dark" />

                <com.egdigital.allzic.ui.ScrollingTextView
                    android:id="@+id/player_sub"
                    style="@android:style/TextAppearance.Small"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ellipsize="marquee"
                    android:singleLine="true"
                    android:text="@string/text_default"
                    android:textColor="@android:color/secondary_text_dark" />
            </LinearLayout>

            <!-- buttons -->

            <ImageButton
                android:id="@+id/player_like"
                android:layout_width="48dp"
                android:layout_height="?android:attr/listPreferredItemHeight"
                android:layout_centerVertical="true"
                android:layout_toLeftOf="@+id/player_play"
                android:background="@drawable/selector_player_banner"
                android:src="@drawable/selector_btn_like_small" />

            <ImageButton
                android:id="@+id/player_play"
                android:layout_width="?android:attr/listPreferredItemHeight"
                android:layout_height="?android:attr/listPreferredItemHeight"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:background="@drawable/selector_player_banner"
                android:src="@drawable/selector_btn_play_small" />

            <ProgressBar
                android:id="@+id/player_loading"
                android:layout_width="?android:attr/listPreferredItemHeight"
                android:layout_height="?android:attr/listPreferredItemHeight"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:visibility="gone" />
        </RelativeLayout>
    </LinearLayout>

</RelativeLayout>